
IF %date:~-0,2%==za GOTO END
IF %date:~-0,2%==zo GOTO END
python manage.py dumpdata >  %date:~-4,4%%date:~-7,2%%date:~-10,2%.json
IF NOT ERRORLEVEL 0 GOTO SEND
gzip *.json 
IF NOT ERRORLEVEL 0 GOTO SEND 
move *.gz \\venus\software\DatabaseBackups\Taskmanager
IF NOT ERRORLEVEL 0 GOTO SEND 

:SEND bmail -s mail.periskal.be -t s.dergatsjev@periskal.com -f root@periskal.com -a "Backup faild" -b "Task manager backup is faild"
:END
